<template>
	<view>
		<view class="">
			<button @click="chooseImg">选择图片</button>
		</view>
		<view>
			<image v-for="item in imgsrc" :src="item"
			@click="showImg(item)"
			></image>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgsrc:[]
			}
		},
		methods: {
				
			chooseImg(){
				var that=this
				uni.chooseImage({
					count:5,
					success(res) {
						console.log(res)
						that.imgsrc=res.tempFilePaths
					}
				})
			},
			showImg(current){
				uni.previewImage({
					current:current,
					urls:this.imgsrc
				})
			}
			
		}
	}
</script>

<style>

</style>
